package com.bjsxt.softrc.test.dbpool;

import java.sql.Connection;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

public class DBCPConn {
	public static Connection getConnection() throws Exception {
		  Context ctx = new InitialContext();
		  DataSource ds=(DataSource)ctx.lookup("java:comp/env/jdbc/test");
		  return ds.getConnection();
	}
}
